import { v4 as uuidv4 } from 'uuid'

export const getUuid = () => {
    //从本地存储获取uuid
    let uuid_token = localStorage.getItem('UuidToken');
    console.log(uuid_token);
    //如果没有，生成随机码
    if (!uuid_token) {
        uuid_token = uuidv4();
        localStorage.setItem('UuidToken', uuid_token);
    }
    return uuid_token
}